#include <iostream>

using namespace std;

int main(int argc, char const *argv[])
{
    // 常量别名
    int n = 7;
    int &n1 = n;
    cout << n << endl;
    cout << n1 << endl;

    // 指针别名
    int *p = &n;
    int *(&p1) = p;
    cout << p << endl;
    cout << p1 << endl;
    // 数组别名
    char a[5] = {'a', 'b', 'c', 'd', 'e'};
    char(&b)[5] = a;
    typedef char array[5];
    array &b1 = a;
    cout << a[1] << endl;
    cout << b[1] << endl;
    cout << b1[1] << endl;
}
